<template>
  <div id="box" v-show="this.flag" :class="className + ' box' ">
      {{content}}
  </div>
</template>

<script>
export default {
  data(){
    return{
      num:123,
      content:'我试试，困',
      flag:false,
      className:''
    }
  }
}
</script>

<style>
.box{
  width: 100%;
  height: 50px;
  line-height: 50px;
  text-align: center;
}
.yes{
  background:greenyellow;
}
.no{
  background:bisque;
}
.mes{
  background:green;
}
.error{
  background:red;
}
</style>